﻿
Namespace Functions
    Public Class MetisRefFunctionList
        Inherits MetisSortedEntityList(Of MetisRefFunction)

        Private _MetisCore As MetisCore
        Private _OwningFunction As MetisFunction

        Sub New(ByVal MetisCore As Core.MetisCore, ByVal OwningFunction As MetisFunction)
            _MetisCore = MetisCore
            _OwningFunction = OwningFunction
        End Sub

        Public Overrides Sub Reload()

        End Sub

        Public Overloads Function IndexOf(ByVal Func As MetisRefFunction) As Integer
            Return MyBase.IndexOf(Func)
        End Function

        Public Overloads Function IndexOf(ByVal Func As MetisFunction) As Integer
            For i As Integer = 0 To Me.Count - 1
                If Func.Equals(Me(i).ReferencedFunction) Then Return i
            Next
            Return -1
        End Function
    End Class
End Namespace